<div class="block list-form">
	<div class="block-title"><?=$block_title?></div>
	
	<form method="post">
		<?php $this->widget('zii.widgets.grid.CGridView', array(
			'id'=>'order-grid',
			'dataProvider'=>$dataProvider,
			'columns'=>array(
				array(
					'type' => 'raw',
					'name' => "选择",
					'value' => 'CHtml::checkbox("orders[]", null, array("value" => $data->order_history_id))',
				),
				array('name' => '订单号', 'value' => '$data->order_id'),
				array('name' => '会员账号', 'value' => '$data->user_id'),
				array('name' => '网站', 'value' => '$data->website'),
				array('name' => '金额', 'value' => '"\$".$data->amount'),
				array('name' => '下单日期', 'value' => '$data->adddate'),
				array('type' => 'raw', 'name' => '状态', 'value' => 'str_replace(array("0", "-1", "1"), array("<span style=\'color:blue\'>待审核</span>", "无效", "<span style=\'color:green\'>有效</span>"), $data->verify_status)')
			),
			
		)); ?>
		
		
		<div class="op-list">
			<?php if ($_GET['verify_status'] === '0' || $_GET['verify_status'] === '-1'): ?>
				<input type="submit" class="op-btn" action="<?php echo $this->createUrl('order/update', array('verify_status' => '1'))?>" value="设为有效" />
			<?php endif ?>
			<?php if (key_exists('verify_status', $_GET) && $_GET['verify_status'] != '-1'): ?>
				<input type="submit" class="op-btn" action="<?php echo $this->createUrl('order/update', array('verify_status' => '-1'))?>" value="设为无效" />
			<?php endif ?>
		</div>
		
		<script>
		$(function(){
			$(".op-btn").click(function(){
				$(this).parents('form:first').attr('action', $(this).attr('action')).submit();
			});
		});
		</script>
	</form>
</div>